Computer programs, when initially written, oftentimes have errors in them which are commonly referred to as bugs. The programs are typically tested to identify these bugs so that they can be fixed and the program will run as intended by the programmer. As computers have become more powerful, computer programs have become larger and more complex, making it increasingly difficult to detect bugs in the programs.
One particular type of bug is referred to as an atomicity violation. An atomicity violation refers to the situation where the programmer intended two instructions to be executed serially without any other instructions interfering with the memory location(s) accessed by those two instructions, but where another instruction can interfere with a memory location(s) accessed by those two instructions. Atomicity violations can be difficult for the programmer to detect, particularly in environments where programs are executed as multiple threads because it is difficult for the programmer to foresee when an instruction from another thread will interfere with the two instructions he or she intended to be executed serially without interference. Accordingly, it would be beneficial to have an improved way to detect such atomicity violations.